<?php

namespace App\Http\Controllers\WeChat;

use App\Http\Controllers\Controller;
use App\Models\WeChatRule;

use Illuminate\Http\Request;

class RuleController extends Controller
{

    public function index()
    {

    }

    public function wechat()
    {
      
        return site()->wechats;
    }

    public function show(WeChatRule $rule)
    {

        return ['rule' => $rule, 'keywords' => $rule->keywords];
    }

    public function destroy(WeChatRule $rule)
    {
        $rule->delete();

        return response()->json(['message' => '删除成功']);
    }
}
